<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.min.js"></script>

    {% load static %}

    <script src="{% static 'utils.js' %}" type="text/javascript"></script>

    {% block include %} {% endblock %}

    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">

    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.6.1/js/bootstrap.bundle.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/fontawesome.min.css"
        integrity="sha512-RvQxwf+3zJuNwl4e0sZjQeX7kUa3o82bDETpgVCH2RiwYSZVDdFJ7N/woNigN/ldyOOoKw8584jM4plQdt8bhA=="
        crossorigin="anonymous" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/solid.min.css"
        integrity="sha512-uj2QCZdpo8PSbRGL/g5mXek6HM/APd7k/B5Hx/rkVFPNOxAQMXD+t+bG4Zv8OAdUpydZTU3UHmyjjiHv2Ww0PA=="
        crossorigin="anonymous" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/js/solid.min.js"
        integrity="sha512-dcTe66qF6q/NW1X64tKXnDDcaVyRowrsVQ9wX6u7KSQpYuAl5COzdMIYDg+HqAXhPpIz1LO9ilUCL4qCbHN5Ng=="
        crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
    <link rel="shortcut icon" href="{% static '256x256.jpg' %}">
    <link rel="stylesheet" href="{% static 'base.css' %}">

    {% block title %} {% endblock %}

</head>

<body>

    <nav class="navbar navbar-expand-md bg-white navbar-dark navigation-bar">
        <a class="navbar-brand offset-xl-1_5" href="{% url 'club:home' %}">
            <img src="{% static 'logo.png' %}" alt="logo" style="width:200px;">
        </a>
        <button class="navbar-toggler navigation-toggle-button" type="button" data-toggle="collapse"
            data-target="#collapsibleNavbar">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="collapsibleNavbar">
            <ul class="navbar-nav ml-auto navigation-bar-right-links">
                <li class="nav-item">
                    <a class="nav-link" href="/selection">机选系统</a>
                </li>
                <li class="nav-item dropdown">
                    {% if user.is_authenticated %}
                    <button class="btn btn-secondary dropdown-button" type="button" id="dropdownMenuButton"
                        data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        {{ user.student_real_name }}
                        <i class="fa-solid fa-chevron-down"></i>
                    </button>
                    <div class='dropdown-menu'>
                        <a class='dropdown-item new-font' href='{% url "club:user_info" %}' scroll='true'>
                            个人信息
                        </a>
                        <div class="dropdown-divider"></div>
                        <a class='dropdown-item new-font' href='{% url "club:logout" %}' scroll='true'>
                            登出
                        </a>
                    </div>
                    {% else %}
                    <button class="btn btn-secondary dropdown-button" type="button" id="dropdownMenuButton"
                        data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        登录/注册
                        <i class="fa-solid fa-chevron-down"></i>
                    </button>
                    <div class='dropdown-menu'>
                        <a class='dropdown-item new-font' href='{% url "club:login" %}' scroll='true'>
                            登录
                        </a>
                        <div class="dropdown-divider"></div>
                        <a class='dropdown-item new-font' href='{% url "club:register" %}' scroll='true'>
                            注册
                        </a>
                    </div>
                    {% endif %}
                </li>
            </ul>
        </div>
    </nav>

    {% block body %} {% endblock %}

</body>

</html>